<ul class="portlet-tab-nav">
    <?php foreach ($this->Session->read('languages') as $key => $language) { ?>
        <li <?php if($this->Session->read('defaultLanguage') == $key){ echo 'class="portlet-tab-nav-active"'; } ?>>
            <a href="#<?php echo $key; ?>" rel="tooltip">
                <?php echo $language; ?>
            </a>
        </li>	
    <?php } ?>
</ul>